<?php

// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport('joomla.application.component.controller');

class ClaimController extends JController
{
	/**
	 * Method to display the view
	 *
	 * @access    public
	 */
	function display()
	{
		$view = &$this->getView('Create', 'html');
		$view->display();
		
	}
	
	function saveClaim() {
		$maSV = JRequest::getVar('maSV', 0, '', 'string');
		$content = JRequest::getVar('content', 0, '', 'string');
		$type = JRequest::getVar('type', 0, '', 'int');
		$model = &$this->getModel("Claim");
		
		$model->saveClaim($maSV, $type, $content);
		$rows = $model->findAll();
		$view = &$this->getView('Find', 'html');
		$view->display($rows);
		
	}

}